--天启
local tianqi = fk.CreateSkill {
    name = "mcdh_tianqi"
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

tianqi:addEffect(fk.StartJudge,{
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(self) and  player:getMark("mcdh_charge") >= 1
    end,
    on_use = function (self, event, target, player, data)
        lib.LoseCharge(player,player,1,self.name)
        local room = player.room
        room:askForGuanxing(player, room:getNCards(2), nil, nil)
    end
})

tianqi:addEffect(fk.TurnStart,{
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(self) and  target == player and player:getMark("mcdh_charge") >= 1
    end,
    on_use = function (self, event, target, player, data)
        lib.LoseCharge(player,player,1,self.name)
        local room = player.room
        room:askForGuanxing(player, room:getNCards(2), nil, nil)
    end
})

Fk:loadTranslationTable {
    ["mcdh_tianqi"] = "天启",
    [":mcdh_tianqi"] = "『天启』<br>蓄力技(1)，回合开始时或一名角色即将进行判定时，你可以卜算2。"
}

return tianqi